package com.gxa.modules.sys.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxa.modules.sys.entity.Picture;
import com.gxa.modules.sys.mapper.PictureMapper;
import com.gxa.modules.sys.service.PictureService;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public
class PictureServiceImpl extends ServiceImpl<PictureMapper, Picture> implements PictureService {
    @Override
    public
    List<Picture> queryAll() {
        List<Picture> pictures = baseMapper.selectList(new QueryWrapper<Picture>());
        return pictures;

    }

    @Override
    public
    void updatePicture(Picture picture) {
        baseMapper.updateById(picture);
    }

    @Override
    public
    void deletePicture(Integer id) {
        baseMapper.deleteById(id);
    }

    @Override
    public
    void insertPicture(Picture picture) {
        baseMapper.insert(picture);
    }
//    List<Picture> queryAll() {
//
//        List<Picture> pictures = baseMapper.selectList(new QueryWrapper<Picture>());
//        return pictures;
//    }
//
//    void updatePicture(Picture picture) {
////        String id = (String)params.get("id");
////        String address = (String) params.get("address");
//       baseMapper.updateById(picture);
//
//
//    }
//
//    void deletePicture(Integer id) {
//    baseMapper.deleteById(id);
//    }
//
//    void insertPicture(Picture picture) {
//    baseMapper.insert(picture);
//    }

}
